package com.ak47.cms.cms.controller

import com.ak47.cms.cms.kong.ChromeDriverUtil
import com.ak47.cms.cms.kong.ShopCollector
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

/**
 * Created by jack on 2017/7/22.
 */

@RestController
class KongShopController {

    @Autowired
    lateinit var shopCollector: ShopCollector

    @Autowired
    lateinit var chromeDriverUtil: ChromeDriverUtil

    @GetMapping("shopCollector")
    fun shopCollector(): String {
        shopCollector.getShopIds()
        return "shopCollector Started"
    }

    @GetMapping("followShop")
    fun followShop(): String {
        chromeDriverUtil.followShop()
        return "followShop Started"
    }

}
